package com.vmock.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.vmock.biz.entity.Url;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.Collection;

/**
 * url路径Mapper接口
 *
 * @author mock
 * @date 2019-11-20
 */
public interface UrlMapper extends BaseMapper<Url> {

//    @Delete("delete from mock_url where url_id in #{idList}")
    @Delete("<script>"
            + "delete from mock_url WHERE url_id IN "
            +"        <foreach collection='coll' item='id' separator=',' open='(' close=')'> " +
            "            #{id}" +
            "        </foreach>"
            +"</script>")

    int deletePhysicsByIds(@Param(Constants.COLLECTION) Collection<? extends Serializable> idList);

}
